< previous page page_798 next page >

Page 798
Place the following initialization code in the Declaration section of the User Maintenance form.
Option Explicit
'
' user maint and login vars
Dim objRec As Object
Dim lgnResult As Long
Public strDBName As String
'
Next, place the code in Listing 21.1 in the Form_Load event of the form.
Type.gifListing 21.1. Setting up the User Maintenance form.
Private Sub Form_Load()
    '
    Me.Caption = "User Maintenance"
    Bin8dInputs
    StartProc
'
End Sub
Listing 21.1 calls two routines that perform the initialization operations. Now add a new subroutine to the form called BindInputs and enter the code from Listing 21.2.
Type.gifListing 21.2. Adding the BindInputs method.
Public Sub BindInputs()
    '
    ' bind inputs to database
    '
    txtField(0).Tag = "UserID"
    txtField(1).Tag = "Password"
    txtField(2).Tag = "UserName"
    txtField(3).Tag = "LastLogIn"
    txtField(4).Tag = "LastLogOut"
    '
End Sub
Now add the code from Listing 21.3 to the new StartProc subroutine.

 
< previous page page_798 next page >

If you like this book, buy it!